package com.example.icongyou.bean;

import com.google.gson.annotations.SerializedName;

public class Chapter {

    @SerializedName("chapterId")
    private Integer chapterId; // 章节ID，通常由数据库自增

    @SerializedName("courseId")
    private String courseId;   // 所属课程ID

    @SerializedName("title")
    private String title;      // 章节标题

    @SerializedName("content")
    private String content;    // 章节内容 (或简介)

    // 构造函数 (创建新章节时使用，ID可为空)
    public Chapter(String courseId, String title, String content) {
        this.courseId = courseId;
        this.title = title;
        this.content = content;
    }

    // 完整的构造函数 (从服务器获取数据时使用)
    public Chapter(Integer chapterId, String courseId, String title, String content) {
        this.chapterId = chapterId;
        this.courseId = courseId;
        this.title = title;
        this.content = content;
    }

    // Getters and Setters

    public Integer getChapterId() {
        return chapterId;
    }

    public void setChapterId(Integer chapterId) {
        this.chapterId = chapterId;
    }

    public String getCourseId() {
        return courseId;
    }

    public void setCourseId(String courseId) {
        this.courseId = courseId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
}